package cn.wizzer.app.web.commons.ext.websocket.action;

import cn.wizzer.app.web.commons.ext.websocket.filter.TokenFilter;
import cn.wizzer.app.web.commons.ext.websocket.main.action.BaseNettyAction;
import cn.wizzer.app.web.commons.ext.websocket.main.action.NettyAction;
import cn.wizzer.framework.util.Result;
import com.alibaba.fastjson.JSONObject;
import io.netty.channel.Channel;
import org.nutz.integration.jedis.RedisService;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

/**
 * @author 22099
 */
@IocBean
@NettyAction(uri = "/demo",filters = {TokenFilter.class})
public class DemoAction extends BaseNettyAction {

    @Inject
    private RedisService redisService;

    public static BaseNettyAction instance() {
        return BaseNettyAction.instance(DemoAction.class);
    }

    @Override
    public Result action(Channel income, JSONObject params) {
        return Result.error();
    }

    @Override
    public Result subscribe(String subscribeParam) {
        return Result.success();
    }

}
